package jdbchomework;

import java.sql.*;

import register.JdbcTools;


public class Lab10 {
	
	public static void main(String args[]) {
		Connection con = null;
		ResultSet rs = null;
		try {
			con = JdbcTools.getConn();
			DatabaseMetaData meta = con.getMetaData();// 得到元数据对象
			String catalog = null;
			String schema = null;
			String tableName = "%";
			String[] types = { "TABLE", "VIEW" };
			rs = meta.getTables(catalog, schema, tableName, types);
			JdbcTools.printRs(rs);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			JdbcTools.close(rs, null, con);
		}

	}

}
